package org.jradweb.core.utils;

import java.text.ParseException;
import java.util.Date;

public class DateFormat {
	
	private static java.text.DateFormat df=new java.text.SimpleDateFormat("yyyy-MM-dd");
	private static java.text.DateFormat dtf=new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	public static String formatDate(Date date){
		return df.format(date);
	}
	public static Date parseDate(String date) throws ParseException{
		return df.parse(date);
	}
	public static String formatDateTime(Date date){
		return dtf.format(date);
	}
	public static Date parseDateTime(String dateTime) throws ParseException{
		return dtf.parse(dateTime);
	}

}
